import { createRouter, createWebHistory } from 'vue-router';
import Home from '../components/home.vue';
import Restaurant from '../components/restaurant.vue';
import User from '../components/user.vue';

const routes = [
    {
        path: '/home',
        name: 'Home',
        component: Home,
    },
    {
        path: '/restaurant/:id',
        name: 'RestaurantDetails',
        component: Restaurant,
    },
    {
        path: '/user',
        name: 'UserInfo',
        component: User,
    },
];

const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;